program arh;

uses
  Vcl.Forms,
  MainFrm in 'MainFrm.pas' {MainForm},
  LofinFrm in 'common\LofinFrm.pas' {LoginForm},
  ApplicationVersionHelper in 'common\helper\ApplicationVersionHelper.pas',
  VersionInfo in 'common\helper\VersionInfo.pas',
  AppUtils in 'common\AppUtils.pas',
  KAZip in 'common\KAZip.pas',
  cmDBUnit in 'common\db\cmDBUnit.pas' {cmDb: TDataModule},
  cmTables in 'common\db\cmTables.pas',
  LoadingSplash in 'common\LoadingSplash.pas' {frmLoading},
  UsersInfo in 'common\UsersInfo.pas',
  SingletonTemplate in 'common\SingletonTemplate.pas',
  WorkerFrm in 'WorkerFrm.pas' {WorkerForm},
  DogFrm in 'DogFrm.pas' {DogForm},
  DogEditFrm in 'DogEditFrm.pas' {DogEditForm},
  DogDopEditFrm in 'DogDopEditFrm.pas' {DogDopEditForm},
  OrderDocPartial in 'OrderDocPartial.pas',
  OrderDocEditFrm in 'OrderDocEditFrm.pas' {OrderDocEditForm},
  OrderDocFrm in 'OrderDocFrm.pas' {OrderDocForm},
  OrderSpecPartial in 'OrderSpecPartial.pas',
  OrderSpecEditFrm in 'OrderSpecEditFrm.pas' {OrderSpecEditForm},
  DogDocPartial in 'DogDocPartial.pas',
  DogDocAddFrm in 'DogDocAddFrm.pas' {DogDocAddForm},
  cmFileManager in 'common\cmFileManager.pas',
  cmFileUtil in 'common\cmFileUtil.pas',
  cmDUtil in 'common\cmDUtil.pas',
  ScanListFrm in 'ScanListFrm.pas' {ScanListForm},
  TextPrinter in 'common\TextPrinter.pas',
  KeyBoard in 'common\KeyBoard.pas',
  KontrFrm in 'KontrFrm.pas' {KontrForm},
  BaseForm in 'common\BaseForm.pas',
  ComplectDocFrm in 'ComplectDocFrm.pas' {ComplectDocForm},
  ScanBlobFrm in 'ScanBlobFrm.pas' {ScanBlobForm},
  ArcObjectFrm in 'ArcObjectFrm.pas' {ArcObjectForm},
  ArhRepFrm in 'ArhRepFrm.pas' {ArhRepForm},
  RepkontrFrm in 'RepkontrFrm.pas' {RepkontrForm},
  IssueDocFrm in 'IssueDocFrm.pas' {IssueDocForm},
  PaymentsFrm in 'PaymentsFrm.pas' {PaymentsForm},
  PaymentsEditFrm in 'PaymentsEditFrm.pas' {PaymentsEditForm},
  PaySchetCreateFrm in 'PaySchetCreateFrm.pas' {PaySchetCreateForm},
  AccountFrm in 'AccountFrm.pas' {AccountForm},
  AccountEditFrm in 'AccountEditFrm.pas' {AccountEditForm},
  ServisesFrm in 'ServisesFrm.pas' {ServisesForm},
  FundsFrm in 'FundsFrm.pas' {FundsForm},
  FundsEditFrm in 'FundsEditFrm.pas' {FundsEditForm},
  OborotFrm in 'OborotFrm.pas' {OborotForm},
  ReviseFrm in 'ReviseFrm.pas' {ReviseForm},
  PostFrm in 'PostFrm.pas' {PostForm};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TcmDb, cmDb);
  LoginForm := TLoginForm.Create(Application);
  LoginForm.ShowModal;
  if LoginForm.ModalResult = 1 then
  begin
    LoginForm.Free;
    Application.CreateForm(TMainForm, MainForm);
    Application.Run;
  end
  else
  begin
    LoginForm.Free;
    Application.Run;
  end;
end.
